Subject class¶
Defined in
Namespace: System.Reactive.Subjects
Assembly: System.Reactive.dll
Full name: System.Reactive.Subjects.Subject<T>
Modifiers: public sealed
Summary¶
Represents an object that is both an observable sequence as well as an observer.
Each notification is broadcasted to all subscribed observers.
Applies to
netstandard2.0
Class hierarchy
classDiagram
class Subject~T~
class SubjectBase~T~
SubjectBase~T~ <|-- Subject~T~
Inherits from: SubjectBase
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Creates a subject. |
Properties¶
| Name | Summary |
|---|---|
| HasObservers | Indicates whether the subject has observers subscribed to it. |
| IsDisposed | Indicates whether the subject has been disposed. |
Methods¶
| Name | Summary |
|---|---|
| OnCompleted | Notifies all subscribed observers about the end of the sequence. |
| OnError | Notifies all subscribed observers about the specified exception. |
| OnNext | Notifies all subscribed observers about the arrival of the specified element in the sequence. |
| Subscribe | Subscribes an observer to the subject. |
| Dispose | Releases all resources used by the current instance of the [Subject](# class and unsubscribes all observers. |